package com.hongyun.tms.common.dto.mship;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 船舶 新增参数
 * @author liPeng
 * @date 2024-05-31
 **/
@Data
public class MShipSaveReqDto implements Serializable {

    private Long id;

    @ApiModelProperty(value = "中文船名")
    @NotBlank(message = "船名不能为空")
    @Size(message = "船名不能超过20个字符", max = 20)
    private String shipName;

    @ApiModelProperty(value = "英文船名")
    @Size(message = "船名不能超过20个字符", max = 20)
    private String shipNameEn;

    @ApiModelProperty(value = "船舶类型代码，字典")
    @NotBlank(message = "船舶类型代码不能为空")
    @Size(message = "船舶类型代码不能超过20个字符", max = 20)
    private String shipKindCode;

    @ApiModelProperty(value = "船舶类型名称")
    private String shipKindName;

    @ApiModelProperty(value = "船舶国籍代码，字典")
    @NotBlank(message = "船舶国籍代码不能为空")
    @Size(max = 30, message = "船舶国籍代码不能超过30个字符")
    private String notionCode;

    @ApiModelProperty(value = "船舶国籍名称")
    @NotBlank(message = "船舶国籍名称不能为空")
    @Size(max = 30, message = "船舶国籍名称不能超过30个字符")
    private String nationName;

    @ApiModelProperty(value = "IMO")
    @Size(max = 20, message = "IMO不能超过20个字符")
    private String imo;

    @ApiModelProperty(value = "呼号")
    @Size(max = 20, message = "呼号不能超过20个字符")
    private String callNo;

    @ApiModelProperty(value = "MMSI")
    @Size(max = 20, message = "MMSI不能超过25个字符")
    private String mmsi;

    @ApiModelProperty(value = "船长")
    @NotNull(message = "船长不能为空")
    @DecimalMax(value = "999", message = "船长不能超过999米")
    @DecimalMin(value = "1", message = "船长不能小于1米")
    private BigDecimal shipLength;

    @ApiModelProperty(value = "船宽")
    @NotNull(message = "船宽不能为空")
    @DecimalMax(value = "999", message = "船长不能超过999米")
    @DecimalMin(value = "1", message = "船长不能小于1米")
    private BigDecimal shipWidth;

    @ApiModelProperty(value = "总吨")
    @NotNull(message = "总吨数不能为空")
    @DecimalMin(value = "0", message = "总吨数不能小于0")
    @DecimalMax(value = "99999.99", message = "总吨数不能大于99999.99")
    private BigDecimal totalTon;

    @ApiModelProperty(value = "净吨")
    @NotNull(message = "净吨数不能为空")
    @DecimalMin(value = "0", message = "净吨数不能小于0")
    @DecimalMax(value = "99999.99", message = "净吨数不能大于99999.99")
    private BigDecimal netTon;

    @ApiModelProperty(value = "载重吨")
    @NotNull(message = "载重吨不能为空")
    @DecimalMin(value = "0", message = "载重吨数不能小于0")
    @DecimalMax(value = "99999.99", message = "载重吨数不能大于99999.99")
    private BigDecimal dwt;

    @ApiModelProperty(value = "舱口数")
    @Max(value = 99, message = "舱口数最大为99个")
    @Min(value = 0, message = "舱口数最少为0")
    private Integer hatchNum;

    @ApiModelProperty(value = "航速")
    @DecimalMin(value = "0", message = "航速不能小于0")
    @DecimalMax(value = "9999.99", message = "航速不能大于9999.99")
    private BigDecimal speed;

    @ApiModelProperty(value = "船上电话")
    @Size(max = 20, message = "船上电话不能超过20个字符")
    private String shipPhone;
}

